//
//  convolute_kernel.cl
//  LowPassFilter_Standalone
//
//  Created by kadlubek47 on 28.04.2013.
//  Copyright (c) 2013 kadlubek47. All rights reserved.
//

__kernel
void convolute( __global float* x_global, __local float* x,
               __constant float* h, __constant unsigned int* M,
               __global float* y
               )
{
    int index = get_global_id(0);
    
    y[index] = 0;
    int N = 2 * (*M) + 1;
    for(int i = 0; i < N; ++i) {
       y[index] += x_global[index + i] * h[i];
    }
}
